<template>
  <view>
    <h1>子组件</h1>
    <!-- <h2>获取父组件的值{{ name }}</h2>
		<h3>获取的姓名：{{ item.name }}</h3>
		<h3>获取的年龄：{{ item.age}}</h3> -->
    <!-- {{ item }} -->
    <h2>获取数据:{{ count }}</h2>
    <button @click="$emit('add', 1)">+1</button>
  </view>
</template>

<script lang="ts" setup>
// const props = defineProps({
// 	name:String,
// 	item:Object,
// })
defineProps<{
  name: string
  item: Object
  count: number
}>()
</script>

<style lang="scss"></style>
